package Person.ith_06;

 class Student {
    String name;
    int age;
    private static String schoolName = "浙工贸";
    public Student(String name,int age){
        this.name = name;
        this.age = age;
    }
    public void read()
    {
        System.out.println("姓名： "+name+"   年龄： "+age+"   学校：   "+schoolName);
    }
    public static void setSchoolName(String a)
    {
        schoolName = a;
    }
    public static String getSchoolName()
    {
        return schoolName;
    }
}
public class StudentDemo {
    public static void main(String[] args) {
        Student s1 = new Student("张三",100);
        s1.read();
        Student s2 = new Student("小明",99);
        s2.read();
        System.out.println("----------------");
        Student.setSchoolName("工贸");
        s1.read();
        s2.read();
    }
}
